//
//  SFUserBaseView.swift
//  SeeFM_Swift
//
//  Created by CBCT_MBP on 2021/10/27.
//

import UIKit

class SFUserBaseView: UIView {

    // 统一创建入口
    static func viewWithCoordinator(coordinator: SFUserCoordinator) -> SFUserBaseView {
        let v = Self.init()
        v.ctr = coordinator
        coordinator.setView(aClass: v)
        return v
    }
    
    // 获取协调器
    func coordinator() -> SFUserCoordinator {
        assert(ctr != nil, String.init(format: "invalid coordinator, check the creating method of %@", self.description))
        return ctr!
    }
    
    // 装配UI零件
    func assembleComponent(info: UserInfo?) {
        guard let v = info else { return }
        
        
    }
    
    fileprivate weak var ctr: SFUserCoordinator?
    

}
